package java8.test;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import java.io.Serializable;

public class OrderItem implements Serializable {
	private static final long serialVersionUID = -4078784466789193644L;

	private Long priductId;
	private Double price;
	private Integer quantity;

	public OrderItem() {
	}

	public OrderItem(Long priductId, Double price, Integer quantity) {
		this.priductId = priductId;
		this.price = price;
		this.quantity = quantity;
	}

	/**
	 * 获取priductId
	 * @return priductId
	 */
	public Long getPriductId() {
		return priductId;
	}

	/**
	 * 设置priductId
	 * @param priductId priductId
	 */
	public void setPriductId(Long priductId) {
		this.priductId = priductId;
	}

	/**
	 * 获取price
	 * @return price
	 */
	public Double getPrice() {
		return price;
	}

	/**
	 * 设置price
	 * @param price price
	 */
	public void setPrice(Double price) {
		this.price = price;
	}

	/**
	 * 获取quantity
	 * @return quantity
	 */
	public Integer getQuantity() {
		return quantity;
	}

	/**
	 * 设置quantity
	 * @param quantity quantity
	 */
	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	// 注意大对象排除
	@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this);
	}
}
